import java.util.Scanner;

public class Test3 {
    public static void main(String[] args) {
        //3.判断随机数是否为素数
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入一个大于1的整数");
        int num = sc.nextInt();
        boolean isPrime = true;
        for (int i = 2; i <= num / 2; i++){
            if(num % i == 0){
                System.out.println(num + "不是素数");
                isPrime = false;
                break;
            }
        }
        if(isPrime){
            System.out.println(num + "是素数");
        }
    }
}
